package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.model.user.UserSubscribe;
import com.atguigu.tingshu.model.user.VipServiceConfig;
import com.atguigu.tingshu.user.client.impl.UserInfoDegradeFeignClient;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserInfoDegradeFeignClient.class,path = "/rpc/inner/userInfo")
public interface UserInfoFeignClient {

    @GetMapping("/getUserInfo/{userId}")
    Result<UserInfoVo> getUserInfo(@PathVariable Long userId);

    @GetMapping("/getUserPaidTrackInAlbum/{albumId}/{userId}")
    Result<Map<Long, String>> getUserPaidTrackInAlbum(
            @PathVariable Long albumId,
            @PathVariable Long userId);

    @GetMapping("/getUserPaidAlbumById/{albumId}/{userId}")
    Result<Boolean> getUserPaidAlbumById(
            @PathVariable Long albumId,
            @PathVariable Long userId);

    @GetMapping("/getVipServiceConfig/{itemId}")
    Result<VipServiceConfig> getVipServiceConfig(@PathVariable Long itemId);
}